package org.lb.MarketingSystem.serviceImpl;

import java.util.List;
import java.util.Map;

import org.lb.MarketingSystem.dao.CustomerUserMapperDao;
import org.lb.MarketingSystem.entity.CustomerUser;
import org.lb.MarketingSystem.service.CustomerUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service(value="customerUserServiceImpl")
public class CustomerUserServiceImpl implements CustomerUserService{

	@Autowired
	private CustomerUserMapperDao customerUserMapperDao;
	
	public List<CustomerUser> get_AllCustomerUsers() {
		return customerUserMapperDao.select_AllCustomerUsers();
	}

	public boolean updateCustomerUser(CustomerUser customerUser) {
		return customerUserMapperDao.updateCustomerUser(customerUser);
	}

	public boolean addCustomerUser(CustomerUser customerUser) {	
		return customerUserMapperDao.insertCustomerUser(customerUser);
	}

	public boolean deleteCustomerUser(Integer customerUserId) {
		return customerUserMapperDao.dropCustomerUser(customerUserId);
	}

	public CustomerUser getCustomerUserById(Integer customerUserId)
	{
		return customerUserMapperDao.selectCustomerUserById(customerUserId);
		
	}

	public List<CustomerUser> getCustomerUsersByName(String name, Integer pagenum, Integer number) {
		// TODO Auto-generated method stub
		return null;
	}

	public CustomerUser getCustomerUserByAcc(String account) {
		// TODO Auto-generated method stub
		return null;
	}

	public CustomerUser getCustomerUserByAccAndName(String account, String name) {
		// TODO Auto-generated method stub
		return null;
	}

	public CustomerUser getCustomerUserByName(String account, String password) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<CustomerUser> getCustomeruserByPage(Integer pagenum, Integer number) {
		return customerUserMapperDao.selectCustomeruserByPage(pagenum, number);
	}

	public Integer getCounts() {
		return customerUserMapperDao.selectCounts();
	}
	
	public CustomerUser getCustomerUserByName(String name) {
		return customerUserMapperDao.selectCustomerUserByName(name);
	}
    public CustomerUser getConstomerUserByName(Map<String, Object> map) {
		
		return customerUserMapperDao.selectConstomerUserByName(map);
	}


}
